<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/12/26
  Time: 16:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" import="java.sql.*"%>
<%@ include file="db.inc" %>
<html>
<head>
    <title>Title</title>
    <body>
    <%

        String teacherno = request.getParameter("teacherno");
        Class.forName("com.mysql.cj.jdbc.Driver");
        Connection conn = DriverManager.getConnection("jdbc:odbc:DSSchool");
        String sql = "update t_vote set vote=vote+1 where teacherno=?";
        PreparedStatement ps = conn.prepareStatement(sql);
        ps.setString(1,teacherno);
        ps.executeUpdate();
        ps.close();
        conn.close();
    %>
    <jsp:forward page="display.jsp"></jsp:forward>
    </body>
</head>

</html>
